const Koa = require("koa");
const bodyparser = require('koa-bodyparser');
const commentRouter = require("../router/comment.router");
const fileRouter = require("../router/file.router");
const loginRouter = require("../router/login.router");
const momentRouter = require("../router/moment.router");
const userRouter = require('../router/user.router')

const app = new Koa();

app.use(bodyparser())
app.use(userRouter.routes());
app.use(userRouter.allowedMethods());
app.use(loginRouter.routes())
app.use(loginRouter.allowedMethods())
app.use(momentRouter.routes())
app.use(momentRouter.allowedMethods())
app.use(commentRouter.routes())
app.use(commentRouter.allowedMethods())
app.use(fileRouter.routes())
app.use(fileRouter.allowedMethods())

module.exports = app